oracle.hadoop.balancer.examples.invindx

## Class InvertedIndex.InvertedIndexKey.GroupingComparator

- java.lang.Object
- - oracle.hadoop.balancer.examples.invindx.InvertedIndex.InvertedIndexKey.GroupingComparator

- All Implemented Interfaces:
    java.util.Comparator<InvertedIndex.InvertedIndexKey>, org.apache.hadoop.io.RawComparator<InvertedIndex.InvertedIndexKey>
  Direct Known Subclasses:
    InvertedIndex.InvertedIndexKey.SortingComparator
  Enclosing class:
    InvertedIndex.InvertedIndexKey

      public static class InvertedIndex.InvertedIndexKey.GroupingComparator
      extends java.lang.Object
      implements org.apache.hadoop.io.RawComparator<InvertedIndex.InvertedIndexKey>

  This comparator compares only the key element (the word) of this composite key class. It is used as the grouping comparator.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InvertedIndex.InvertedIndexKey.GroupingComparator()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)`
    `int` | `compare(InvertedIndex.InvertedIndexKey a, InvertedIndex.InvertedIndexKey b)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Comparator

      `equals`

- - ### Constructor Detail

    - #### InvertedIndex.InvertedIndexKey.GroupingComparator

          public InvertedIndex.InvertedIndexKey.GroupingComparator()

  - ### Method Detail

    - #### compare

          public int compare(byte[] b1,
                    int s1,
                    int l1,
                    byte[] b2,
                    int s2,
                    int l2)

      Specified by:
        `compare` in interface `org.apache.hadoop.io.RawComparator<InvertedIndex.InvertedIndexKey>`

    - #### compare

          public int compare(InvertedIndex.InvertedIndexKey a,
                    InvertedIndex.InvertedIndexKey b)

      Specified by:
        `compare` in interface `java.util.Comparator<InvertedIndex.InvertedIndexKey>`

Copyright © 2013, 2014, Oracle and/or its affiliates. All rights reserved.